<script language="javascript">
function validate_form(thisform)
{
with (thisform)
{
	
	if (validate_required(txtten,"Bạn chưa nhập tên công ty!")==false)
 	{txtten.focus();return false;}
	if (validate_required(txtdiachi,"Bạn chưa nhập địa chỉ!")==false)
 	{txtdiachi.focus();return false;}
	if (validate_required(txtdienthoai,"Bạn chưa nhập điện thoại!")==false)
 	{txtdienthoai.focus();return false;}
	if (validate_required(txtbanquyen,"Bạn chưa nhập bản quyền!")==false)
 	{txtbanquyen.focus();return false;}
	
}
}
</script>
<?
$qr1=mysql_query("select * from tbcongty where  lang_id='$lang'"); 
$rowedit=mysql_fetch_array($qr1);
$congty_id=$rowedit['congty_id'];
$congty_ten=$rowedit['congty_ten'];
$congty_diachi=$rowedit['congty_diachi'];
$congty_dienthoai=$rowedit['congty_dienthoai'];
$congty_fax=$rowedit['congty_fax'];
$congty_email=$rowedit['congty_email'];
$congty_yahoo1=$rowedit['congty_yahoo1'];
$congty_yahoo2=$rowedit['congty_yahoo2'];
$congty_skype=$rowedit['congty_skype'];
$congty_gioithieu=$rowedit['congty_gioithieu'];
$congty_logo=$rowedit['congty_logo'];
$congty_slogan=$rowedit['congty_slogan'];
$congty_banquyen=$rowedit['congty_banquyen'];
$congty_hotline=$rowedit['congty_hotline'];
$congty_title=$rowedit['congty_title'];
$congty_keyword=$rowedit['congty_keyword'];
$congty_des=$rowedit['congty_des'];
$congty_skype2=$rowedit['congty_skype2'];
$qr12=mysql_query("select * from tbcauhinh where cauhinh_id=1"); 
$rowedit2=mysql_fetch_array($qr12);
$cauhinh_site_hoatdong=$rowedit2['cauhinh_site_hoatdong'];
$cauhinh_site_trang=$rowedit2['cauhinh_site_trang'];
$cauhinh_site_thongbao=$rowedit2['cauhinh_site_thongbao'];
$cauhinh_site_socot=$rowedit2['cauhinh_site_socot'];
$cauhinh_site_sosanpham=$rowedit2['cauhinh_site_sosanpham'];
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td style="padding:10px">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
  
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td   width="6" height="6"><img src="images/j_crn_tl_med.png" width="6" height="6" /></td>
            <td  background="images/j_crn_t_med.png" width="100%"></td>
            <td  width="6" height="6" ><img src="images/j_crn_tr_med.png" width="6" height="6" /></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="1" background="images/dot.png"></td>
            <td class="bg_title"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="5%"><img src="images/icon-48-menumgr.png" width="48" height="48" /></td>
                <td width="45%" class="mana_title"> Cấu hình website</td>
                <td width="50%" align="center">
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="75%">&nbsp;</td>
                      <td class="icon_style"><a href="#" onclick="document.getElementById('submit').click()"><img src="images/icon-32-save.png" width="32" height="33"  border="0"/><br />
                      Cập nhật</a></td>
                      <td class="icon_style"><a href="#"><img src="images/icon-32-help.png" width="32" height="32"  border="0"/><br />
                      Tr&#7907; gi&uacute;p</a></td>
                    </tr>
                  </table>
                  </td>
              </tr>
            </table></td>
            <td width="1" background="images/dot.png"></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="6" height="6" ><img src="images/j_crn_bl_med.png" width="6" height="6" /></td>
            <td  background="images/j_crn_b_med.png" width="100%"></td>
            <td width="6" height="6" ><img src="images/j_crn_br_med.png" width="6" height="6" /></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="7"></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td   width="6" height="6"><img src="images/j_crn_tl_med.png" width="6" height="6" /></td>
            <td  background="images/j_crn_t_med.png" width="100%"></td>
            <td  width="6" height="6" ><img src="images/j_crn_tr_med.png" width="6" height="6" /></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="1" background="images/dot.png"></td>
            <td bgcolor="#fbfbfb"><form id="frmdanhsach" name="frmdanhsach" method="post" action="index.php?progid=10&cauhinh=xuly" onsubmit="return validate_form(this);">
            <input type="hidden" name="id" id="id" value="<?=$congty_id?>" />
              <table width="100%" border="0" cellspacing="2" cellpadding="2">
                <tr>
                  <td valign="top" style="padding-left:15px; width:64%"><fieldset id="fieldsearch2" runat="server">
                  <legend style="font-size:14px; color: black" title="Search" class="title_field"><span class="title_field">Thông tin công ty</span></legend>
                  <table width="100%" border="0" cellspacing="3" cellpadding="3">
                      <tr>
                        <td align="right" width="28%" class="bg_form_left">Tên </td>
                        <td width="72%" class="bg_form_right"> <input name="txtten" type="text" id="txtten" style="width:250px" value="<?=$congty_ten?>" maxlength="150"  />                        </td>
                      </tr>
                      <tr>
                        <td align="right" class="bg_form_left">Địa chỉ</td>
                        <td  class="bg_form_right"><input name="txtdiachi" type="text" id="txtdiachi"  style="width:250px" value="<?=$congty_diachi?>" maxlength="150" /></td>
                      </tr>
                      
                      <tr>
                        <td align="right" class="bg_form_left">Điện thoại</td>
                        <td  class="bg_form_right"><input name="txtdienthoai" type="text" id="txtdienthoai"  style="width:250px" value="<?=$congty_dienthoai?>" maxlength="45" /></td>
                      </tr>
                      <tr>
                        <td align="right" class="bg_form_left">Fax</td>
                        <td  class="bg_form_right"><input name="txtfax" type="text" id="txtfax"  style="width:250px" value="<?=$congty_fax?>" maxlength="45" /></td>
                      </tr>
                      <tr>
                        <td align="right" class="bg_form_left">Hotline </td>
                        <td  class="bg_form_right"><input name="txthotline" type="text" id="txthotline"  style="width:250px" value="<?=$congty_hotline?>" maxlength="45" /></td>
                      </tr>
                      <tr>
                        <td align="right" class="bg_form_left">Email</td>
                        <td  class="bg_form_right"><input name="txtemail" type="text" id="txtemail"  style="width:250px" value="<?=$congty_email?>" maxlength="150" /></td>
                      </tr>
                      <? $ok=false;
					  if($ok==true){?>
                      <tr>
                        <td align="right" class="bg_form_left"><strong>Yahoo1</strong></td>
                        <td class="bg_form_right"><input name="txtyahoo1" type="text" id="txtyahoo1"  style="width:250px" value="<?=$congty_yahoo1?>" maxlength="150" /></td>
                      </tr>
                         <tr>
                           <td align="right" class="bg_form_left"><strong>Yahoo2</strong></td>
                           <td class="bg_form_right"><input name="txtyahoo2" type="text" id="txtyahoo2"  style="width:250px" value="<?=$congty_yahoo2?>" maxlength="150" /></td>
                         </tr>
                         <tr>
                           <td align="right" class="bg_form_left">Skype</td>
                           <td  class="bg_form_right"><input name="txtskype" type="text" id="txtskype"  style="width:250px" value="<?=$congty_skype?>" maxlength="150" /></td>
                         </tr>
                         <tr>
                           <td align="right" class="bg_form_left">Slogan</td>
                           <td  class="bg_form_right"><input name="txtslogan" type="text" id="txtslogan"  style="width:250px" value="<?=$congty_slogan?>" maxlength="500" /></td>
                         </tr>
                        
                         
                        
                         <tr>
                           <td align="right" class="bg_form_left">Keyword footer</td>
                           <td  class="bg_form_right">&nbsp;</td>
                         </tr>
                      <tr>
                        <td colspan="2"  class="bg_form_left">
                            <?php
$oFCKeditor = new FCKeditor('txtnoidung') ;
$oFCKeditor->BasePath	= "../fckeditor/" ;
$oFCKeditor->Value		= $congty_gioithieu ;
$oFCKeditor->Create() ;
echo $sBasePath;
?>      </td>
                        </tr> <? }?>
                         <tr>
                           <td align="right" class="bg_form_left">Bản quyền</td>
                           <td  class="bg_form_right"><input name="txtbanquyen" type="text" id="txtbanquyen"  style="width:250px" value="<?=$congty_banquyen?>" maxlength="150" /></td>
                         </tr>
                      <tr>
                        <td align="right" class="bg_form_left">Title</td>
                        <td align="left" >
                          <textarea name="txttitle" cols="50" rows="4" id="txttitle"><?=$congty_title?></textarea>
                       </td>
                      </tr>
                      <tr>
                        <td align="right" class="bg_form_left">Keyword</td>
                        <td align="left" ><textarea name="txtkeyword" cols="50" rows="4" id="txtkeyword"><?=$congty_keyword?></textarea></td>
                      </tr>
                      <tr>
                        <td align="right" class="bg_form_left">Desciption</td>
                        <td align="left" ><textarea name="txtdesciption" cols="50" rows="4" id="txtdesciption"><?=$congty_des?></textarea></td>
                      </tr>
                      <tr>
                        <td align="right" class="bg_form_left"><input type="submit" name="submit" id="submit" value="Cập nhật" /></td>
                        <td align="left" >
                          <input type="reset" name="Reset" id="button" value="Nhập lại" />                        </td>
                      </tr>
                    </table>
                  </fieldset></td>
                  <td></td>
                  <td  valign="top" style="padding-right:15px; width:35%"><fieldset id="fieldsearch" runat="server">
                  <legend style="font-size:14px; color: black" title="Search" class="title_field"><span class="title_field">Cấu hình site</span></legend>
                  <table width="100%" border="0" cellspacing="1" cellpadding="1">
                  <tr>
                    <td><table width="100%" border="0" cellspacing="2" cellpadding="2">
                      <tr>
                        <td width="28%" align="right" class="bg_form_left">Số  tin</td>
                        <td width="72%" class="bg_form_right"><input name="txtdodai" type="text" id="txtdodai" maxlength="2" style="width:50px" value="<?=$cauhinh_site_trang?>" />
                          /1 trang</td>
                      </tr>
                      <tr>
                        <td align="right" class="bg_form_left">Số sản phẩm</td>
                        <td align="left" ><span class="bg_form_right">
                          <input name="txtdodai3" type="text" id="txtdodai3" maxlength="2" style="width:50px" value="<?=$cauhinh_site_sosanpham?>" />
                          /1 trang</span></td>
                      </tr>
                      <tr>
                        <td align="right" class="bg_form_left">Khóa website</td>
                        <td align="left" >
                          <input type="radio" name="txtstatus" id="txtstatus" value="0" <? if($cauhinh_site_hoatdong==0){?> checked="checked" <? }?> />
                          có
                          <input name="txtstatus" type="radio" id="txtstatus" value="1" <? if($cauhinh_site_hoatdong==1){?> checked="checked" <? }?> />
                          không</td>
                      </tr>
                      
                    </table></td>
                  </tr>
                  <tr>
                    <td><span $included="null">Thông báo ngừng truy cập site </span></td>
                  </tr>
                  <tr>
                    <td><span class="bg_form_right">
                      <textarea name="txtthongbao" cols="30" rows="9" id="txtthongbao"><?=$cauhinh_site_thongbao?></textarea>
                    </span></td>
                  </tr>
                  <tr>
                    <td><table width="100%" border="0" cellspacing="1" cellpadding="1">
                      <tr>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                      </tr>
                      <tr>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                      </tr>
                      <tr>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                      </tr>
                      <tr>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                      </tr>
                      <tr>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                        </tr>
                      <tr>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                        </tr>
                      <tr>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                      </tr>
                         <tr>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                      </tr>
                         <tr>
                           <td colspan="2">&nbsp;</td>
                           </tr>
                         <tr>
                        <td colspan="2">&nbsp;</td>
                        </tr>
                    </table></td>
                  </tr>
              
                  <tr>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                  </tr>
                 
                 </table>
                  </fieldset>
                 </td>
                </tr>
              </table>
              
                        </form>
            </td>
            <td width="1" background="images/dot.png"></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="6" height="6" ><img src="images/j_crn_bl_med.png" width="6" height="6" /></td>
            <td  background="images/j_crn_b_med.png" width="100%"></td>
            <td width="6" height="6" ><img src="images/j_crn_br_med.png" width="6" height="6" /></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
</td>
  </tr>
</table>
